package com.llp.javaweb.dao;

import com.llp.javaweb.mapper.SetEmailMapper;
import com.llp.javaweb.pojo.Email;
import com.llp.javaweb.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * @author llp
 * {@code @date} 2022年11月02日16:38
 */

public class SetEmailDao {
    public static void setEmail(String fromaddress, String frompassword, String toadress) {
        Email email=new Email(fromaddress,frompassword,toadress);
        SqlSession sqlSession = SqlSessionUtil.getSqlSession();
        SetEmailMapper mapper = sqlSession.getMapper(SetEmailMapper.class);
        mapper.setMail(email);
    }
}
